<template>
    <div>
        <van-nav-bar :title="props.title" v-if="isShow" />
        <van-nav-bar :title="props.title" v-else left-text="返回" left-arrow @click-left="onClickLeft" />
    </div>
</template>

<script setup>
const props = defineProps(['title'])

import { ref } from "vue"

let isShow = ref(true)

const onClickLeft = () => history.back();

if (props.title == "首页" || props.title == "附近门店" || props.title == "孕育" || props.title == "购物车" || props.title == "我的") {
    isShow.value = true
} else {
    isShow.value = false
}

</script>

<style lang="scss" scoped></style>